home *** CD-ROM | disk | FTP | other *** search
- 2 gosub58000:poke53281,0:poke53280,6:poke53277,0
- 3 print"[147] muzik-maker by mark jordan"
- 4 print" just follow the prompts"
- 8 fort=1to500:ifpeek(198)=0thennext
- 9 poke198,0
- 10 ifa$="*"thenfort=1to3:f(t)=peek(49416+t):e(t)=f(t)-1:next:goto90
- 15 print"[147][144]"," please stand by"
- 20 poke53281,1:poke53280,1:poke55279,10
- 25 dimnv$(11),nf$(11),n1$(11)
- 30 fort=0to11:readnv$(t):next
- 35 fort=0to11:readnf$(t):next
- 40 fort=0to22:reada:poke704+t,a:next:fort=23to63:poke704+t,0:next
- 45 fort=49152to49407:reada:poket,a:next
- 50 fort=49568to49637:reada:poket,a:next
- 55 m=155:da=49424:rs=49425:up=49421:hp=49422:f(1)=1:f(2)=1:f(3)=1
- 60 dimn$(3,m),oc(3,m),d(3,m),np(3,m),du(3,m)
- 65 sc$="":s$=" ":sp$=sc$+s$+s$+s$:s1$=s$+s$+s$+s$
- 70 n$=""
- 75 cb$=left$(n$,19)+s1$+s1$+s1$+s1$
- 80 gosub130
- 85 gosub890
- 90 poke53281,1:gosub825
- 95 gosub305
- 100 gosub850
- 105 gosub315
- 110 gosub135
- 115 gosub650
- 120 gosub150
- 125 end
- 130 sys65418:s=54272:forl=stos+24:pokel,0:next:return
- 135 poke2,4:pokev+21,0
- 140 fort=1ton:poke49416+t,e(t)+1:poke49413+t,0:poke49407+t,e(t)+1:next
- 145 poke49433,0:sys49152:return
- 150 form=1ton:w=(m-1)*7
- 155 poke1307,m+176
- 160 q=(m-1)*4:ad(m)=peek(da+w):sr(m)=peek(rs+w)
- 163 pu(m)=peek(up+w):ph(m)=peek(hp+w)
- 165 geta$:ifa$=""then165
- 167 ifa$="q"thengosub60000:gosub650:goto165
- 170 ifa$="d"thenad(m)=(ad(m)+1)and255
- 175 ifa$="a"thenad(m)=(ad(m)+16)and255
- 180 ifa$="r"thensr(m)=(sr(m)+1)and255
- 185 ifa$="s"thensr(m)=(sr(m)+16)and255
- 190 ifa$=chr$(133)thenwf(m)=17
- 195 ifa$=chr$(134)thenwf(m)=33
- 200 ifa$=chr$(135)thenwf(m)=65
- 205 ifa$=chr$(136)thenwf(m)=129
- 210 ifa$="0"thenwf(m)=0
- 215 ifa$="&"thengosub910
- 230 ifa$="^"then300
- 235 ifa$="p"thenpu(m)=pu(m)+16:ifpu(m)>255thenpu(m)=0
- 240 ifa$="h"thenph(m)=ph(m)+1:ifph(m)>15thenph(m)=0
- 245 ifa$="_"thengosub130:gosub535:sys49152
- 250 ifa$="+"thengosub130:print"[147]":goto100
- 255 ifa$="$"thengosub130:gosub870:gosub650
- 260 ifa$="1"ora$="2"ora$="3"thengosub130:gosub525:sys49152
- 265 printleft$(n$,18)
- 270 print"decay = [157][157][157]"ad(m)and15
- 273 print"attack = [157][157][157]"(ad(m)and240)/16
- 275 print"sustain = [157][157][157]"(sr(m)and240)/16
- 277 print"release = [157][157][157]"sr(m)and15
- 280 poke49413+m,wf(m):pokeda+w,ad(m):pokers+w,sr(m)
- 285 pokeup+w,pu(m):pokehp+w,ph(m)
- 290 print"pulse = [157][157][157][157]"int(pu(m)/16):print"hi pulse= [157][157][157][157]"ph(m)
- 295 goto165
- 300 next:goto150
- 305 input"[147]how many voices (1 - 3)3[157][157][157]";n:ifn<1orn>3then305
- 310 print"[147]":return
- 315 forj=1ton:k=e(j):du(j,0)=4:oc(j,0)=4:n$(j,0)="c"
- 320 k=k+1:tn=tn+1:z=0
- 325 gosub385:gosub440:gosub465
- 330 li=10:gosub845:print,"[154]check note position":gosub510
- 335 print,"press: _ [146] to redo"
- 340 print," * [146] to end voice"j
- 345 print,"[151]type any other key to continue[154]"
- 350 geta$:ifa$=""then350
- 355 gosub130
- 360 ifa$="*"then375
- 365 ifa$="_"then325
- 370 goto320
- 375 e(j)=k:nextj:gosub790
- 380 return
- 385 pd=du(j,k-1)
- 390 li=6:gosub845:print,"[154]note "k"[157] , voice [157][157][157]"j
- 395 print,"note duration"
- 400 print," 1 = whole note ",," 2 = half note ";
- 405 print,," 4 = quarter note, etc"
- 410 print,"add period for dotted notes"
- 415 print,"[155](previous duration: [152]"pd")"
- 420 x=pd:gosub640:ifx<1orx>16then420
- 422 du(j,k)=x:x$=str$(x)
- 425 ifval(x$)<1thenx=val(mid$(x$,3)):z=1/x*te
- 430 d(j,k)=1/x*te*2-4+z
- 435 return
- 440 po=oc(j,k-1)
- 445 li=12:gosub845:print,"[154]octave (0 - 7)"
- 450 print,"[155](previous octave was [152]"po")[151]"
- 455 x=po:gosub640:ifx<0orx>7then455
- 460 oc(j,k)=x:return
- 465 pn$=n$(j,k-1):y$=pn$:printcb$:print"[145] "
- 470 li=11:gosub845:print,"[154]note (a - g) ":print," + [146]sharp - [146]flat"
- 475 print,"[155](previous note was [152]"pn$")[151]"
- 480 printcb$:input" ";y$
- 485 ify$="\"then495
- 490 ifleft$(y$,1)<"a"orleft$(y$,1)>"g"then480
- 495 n$(j,k)=y$:gosub740
- 500 pokev+1,141-((28*(oc(j,k)-4))+d*4)
- 505 return
- 510 pokes+5,132:pokes+6,132
- 515 pokes,((np(j,k)/256)-int(np(j,k)/256))*256:pokes+1,int(np(j,k)/256)
- 520 pokes+4,33:pokes+24,15:return
- 525 vo=val(a$):ifvo>nthenreturn
- 530 h=peek(49407+vo):goto545
- 535 input"[147]alter which voice";v$:vo=val(v$):ifvo<1orvo>3then535
- 540 h=1:input"[147]start with what note";h
- 545 fork=htoe(vo):j=vo:z=0
- 550 ifd(j,k)=0then560
- 555 pd=du(j,k):po=oc(j,k):pn$=n$(j,k):y$=pn$
- 560 print"[147]","[157][157]press _ [146] to alter note"
- 563 print,"[157][157][157]any other key to continue"
- 565 print,"note #"k" - "pn$
- 570 print,"duration - "pd
- 575 print,"octave - "po
- 580 geta$:ifa$=""then580
- 585 ifa$="_"thengosub600
- 590 next
- 595 gosub650:gosub135:return
- 600 print"[147]":gosub850:gosub390:gosub445:gosub470
- 605 j1=(j-1)*768:n1=np(j,k)/256:it=49664
- 610 pokeit+k-1+j1,d(j,k):pokeit+255+k+j1,(n1-int(n1))*256
- 615 pokeit+511+k+j1,n1
- 620 print"press _ [146] to redo, otherwise any key":gosub510
- 625 geta$:ifa$=""then625
- 630 ifa$="_"then600
- 635 gosub130:return
- 640 qq$=" enter 'exit' to quit":printcb$:ag$=""
- 642 print""qq$:input" ";ag$
- 644 ifag$="exit"thengosub60000:goto640
- 645 ifag$<>""thenx=val(ag$):printcb$:return
- 646 printcb$:return
- 650 print"[147]press: [154] a [146] to increment attack"
- 655 print," d [146] to increment decay"
- 660 print,"[156] s [146] to increment sustain"
- 665 print,"[152] r [146] to increment release"
- 670 print,"[155] p [146] to increment lo pulse"
- 675 print,"[159] h [146] to increment hi pulse"
- 680 print"[129] voice:[146] [166][166][166] ^ to change voices"
- 685 print"[129] [146] [166][166][166] _ to alter (1 2 3)"
- 690 print,"[152][166][166][166] + to append "
- 695 print,"[166][166][166] $ to save "
- 700 print,"[166][166][166] & to play section "
- 710 print,"[154] f1 [146] for triangle wave"
- 715 print," f3 [146] for sawtooth wave"
- 720 print,"[156] f5 [146] for pulse wave"
- 725 print,"[154] f7 [146] for noise"
- 730 print,"[152] 0 [146] to shut off voice"
- 732 print," q [146] to quit[144]"
- 735 pokev+21,0:return
- 740 c=0:d=0
- 745 ifn$(j,k)="\"thennp(j,k)=1:goto785
- 750 ifn$(j,k)=n1$(c)thennp(j,k)=268.234375*(1.059465^c)*2^oc(j,k):goto785
- 755 ifsf$="-"then780
- 760 onc+1 goto770,765,770,765,765,770,765,770,765,770,765,765
- 765 d=d+1
- 770 c=c+1:ifc>11then785
- 775 goto750
- 780 onc+1goto765,770,765,770,765,765,770,765,770,765,770,765
- 785 return
- 790 it=49664:fori=1ton
- 795 fort=f(i)toe(i)
- 800 pokeit+t-1,d(i,t)
- 805 pokeit+255+t,((np(i,t)/256)-int(np(i,t)/256))*256
- 810 pokeit+511+t,int(np(i,t)/256)
- 815 next:it=it+768:next
- 820 return
- 825 sf$="-":input"[147][152]program in sharps (+)or flats (-)-[157][157][157]";sf$:
- 830 ifsf$="+"thenfort=0to11:n1$(t)=nv$(t):next
- 835 ifsf$="-"thenfort=0to11:n1$(t)=nf$(t):next
- 837 te=64:input"[147]tempo (fast,med,slow)m[157][157][157]";te$
- 838 ifte$="s"thente=80
- 839 ifte$="f"thente=48
- 840 return
- 845 printleft$(n$,7):fort=1to12:printsp$;:next:printleft$(n$,li):return
- 850 v=53248:poke2040,11:pokev+21,1
- 855 pokev,33:pokev+1,141:pokev+2,26:pokev+39,0
- 860 printleft$(n$,6)
- 865 fort=1to2:fori=1to5:print"[151][175][175][175][175][175]":next:print:next:return
- 870 input"[147]name of song";so$
- 875 open1,8,1,so$:fort=49408tot+2:poket,0:next
- 880 poke780,78:poke78,0:poke79,192:poke781,0:poke782,203:sys65496
- 885 gosub135:close1:return
- 890 print"[147]to load and append press * "
- 895 geta$:ifa$=""then895
- 900 ifa$="*"theninput"song title";t$:loadt$,8,1
- 905 sys49616:return
- 910 input"[147]starting note";ss
- 915 se=e(1)+1:input"ending note";se
- 920 poke49433,ss:poke49417,se:poke49408,ss:poke49409,ss:poke49410,ss
- 925 gosub130:gosub650:sys49152:return
- 930 data c,c+,d,d+,e,f,f+,g,g+,a,a+,b
- 935 data c,d-,d,e-,e,f,g-,g,a-,a,b-,b
- 940 data0,126,0,1,255,128,3,255,192,15,255,240,15,255,240,3
- 945 data255,192,1,255,128,0,126
- 950 data 120,169,13,141,20,3,169,192
- 955 data 141,21,3,88,96,173,0,193
- 960 data 205,9,193,208,23,173,25,193
- 965 data 141,0,193,141,1,193,141,2
- 970 data 193,234,234,234,169,0,133,251
- 975 data 133,252,133,253,165,251,240,20
- 980 data 198,251,165,252,240,78,198,252
- 985 data 165,253,208,3,76,194,192,198
- 990 data 253,76,160,193,173,3,193,240
- 995 data 20,173,6,193,41,254,141,4
- 1000 data 212,169,0,141,3,193,165,2
- 1005 data 133,251,76,48,192,172,0,193
- 1010 data 185,0,194,133,251,185,0,195
- 1015 data 141,0,212,185,0,196,141,1
- 1020 data 212,238,0,193,173,6,193,141
- 1025 data 4,212,169,4,141,3,193,133
- 1030 data 2,76,48,192,173,4,193,240
- 1035 data 20,173,7,193,41,254,141,11
- 1040 data 212,169,0,141,4,193,165,2
- 1045 data 133,252,76,54,192,172,1,193
- 1050 data 185,0,197,133,252,185,0,198
- 1055 data 141,7,212,185,0,199,141,8
- 1060 data 212,238,1,193,173,7,193,141
- 1065 data 11,212,169,1,141,4,193,76
- 1070 data 54,192,173,5,193,240,20,173
- 1075 data 8,193,41,254,141,18,212,169
- 1080 data 0,141,5,193,165,2,133,253
- 1085 data 76,63,192,172,2,193,185,0
- 1090 data 200,133,253,185,0,201,141,14
- 1095 data 212,185,0,202,141,15,212,238
- 1100 data 2,193,173,8,193,141,18,212
- 1105 data 169,1,141,5,193,76,63,192
- 1160 data 160,0,162,0,185,13,193,153
- 1165 data 2,212,200,232,224,2,208,244
- 1170 data 200,232,224,5,240,9,185,13
- 1175 data 193,153,2,212,76,176,193,200
- 1180 data 200,192,21,240,3,76,162,193
- 1185 data 169,15,141,24,212,76,49,234
- 1190 data 169,194,133,252,169,0,133,251
- 1195 data 168,162,247,145,251,200,208
- 1200 data 251,230,252,232,208,246,96
- 58000 nm$="[205]ark [202]ordan":pr$="[205]uzic [205]aker"
- 58010 deffncn(n)=int(19-n/2)
- 58020 t$=" ":c=0:c$="":print"[147]":poke53281,0
- 58030 printspc(7)""t$:printspc(7)" [146]"
- 58040 printtab(fncn(len(pr$)))"[145]"pr$
- 58050 printspc(7)""t$:print:printtab(18)"by"
- 58060 print:printspc(fncn(len(nm$)))"[158]"nm$""
- 58070 printspc(12)"[195]opyright 1986"
- 58080 print" [159] [195]ommodore [208]ublications"
- 58090 print" [158][204][207][193][196][211][212][193][210] is not public domain."
- 58100 print:print" [208]lease respect the author's rights."
- 58110 print:print" [208]ress space bar to continue."
- 58120 forcc=1to48:getk$:ifk$=" "then58150
- 58130 ifcc=1thenprintmid$(c$,c+2,1)"[145][145]";:c=not(c)
- 58140 next:goto58110
- 58150 printc$chr$(142):return
- 60000 rem quit for sure?
- 60005 printcb$;"";
- 60010 print" quit for sure?[144] "
- 60020 poke198,0:wait198,1:getdd$:ifdd$<>"y"thenreturn
- 60030 :
- 63000 sys65418:poke53269,0:poke54296,0
- 63002 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
- 63010 ifer<>63thenend
- 63020 load"hello connect",8
-